const getters = {
  token: state => state.user.token,
  user: state => {
    state.user.user = JSON.parse(sessionStorage.getItem('user'))
    return state.user.user
  },
  roles: state => {
    state.user.roles = JSON.parse(sessionStorage.getItem('roles'))
    return state.user.roles
  }
}

export default getters
